package com.ly.heart.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ly.common.utils.DateUtils;
import com.ly.heart.mapper.OrderFinanceDetailMapper;
import com.ly.heart.service.IOrderFinanceDetailService;
import org.springframework.stereotype.Service;
import com.ly.heart.domain.OrderFinanceDetailEntity;

import javax.annotation.Resource;

/**
 * 采购订单明细财务信息Service业务层处理
 *
 * @author cxl
 * @date 2024-06-23
 */
@Service
public class OrderFinanceDetailServiceImpl extends ServiceImpl<OrderFinanceDetailMapper,OrderFinanceDetailEntity> implements IOrderFinanceDetailService {

    @Resource
    private OrderFinanceDetailMapper orderFinanceDetailMapper;

    /**
     * 查询采购订单明细财务信息
     *
     * @param id 采购订单明细财务信息ID
     * @return 采购订单明细财务信息
     */
    @Override
    public OrderFinanceDetailEntity selectOrderFinanceDetailEntityById(String id)
    {
        return orderFinanceDetailMapper.selectOrderFinanceDetailEntityById(id);
    }

    /**
     * 查询采购订单明细财务信息列表
     *
     * @param orderFinanceDetailEntity 采购订单明细财务信息
     * @return 采购订单明细财务信息
     */
    @Override
    public List<OrderFinanceDetailEntity> selectOrderFinanceDetailEntityList(OrderFinanceDetailEntity orderFinanceDetailEntity)
    {
        return orderFinanceDetailMapper.selectOrderFinanceDetailEntityList(orderFinanceDetailEntity);
    }

    /**
     * 新增采购订单明细财务信息
     *
     * @param orderFinanceDetailEntity 采购订单明细财务信息
     * @return 结果
     */
    @Override
    public int insertOrderFinanceDetailEntity(OrderFinanceDetailEntity orderFinanceDetailEntity)
    {
        orderFinanceDetailEntity.setCreateTime(DateUtils.getNowDate());
        return orderFinanceDetailMapper.insertOrderFinanceDetailEntity(orderFinanceDetailEntity);
    }

    /**
     * 修改采购订单明细财务信息
     *
     * @param orderFinanceDetailEntity 采购订单明细财务信息
     * @return 结果
     */
    @Override
    public int updateOrderFinanceDetailEntity(OrderFinanceDetailEntity orderFinanceDetailEntity)
    {
        return orderFinanceDetailMapper.updateOrderFinanceDetailEntity(orderFinanceDetailEntity);
    }

    /**
     * 批量删除采购订单明细财务信息
     *
     * @param ids 需要删除的采购订单明细财务信息ID
     * @return 结果
     */
    @Override
    public int deleteOrderFinanceDetailEntityByIds(String[] ids)
    {
        return orderFinanceDetailMapper.deleteOrderFinanceDetailEntityByIds(ids);
    }

    /**
     * 删除采购订单明细财务信息信息
     *
     * @param id 采购订单明细财务信息ID
     * @return 结果
     */
    @Override
    public int deleteOrderFinanceDetailEntityById(String id)
    {
        return orderFinanceDetailMapper.deleteOrderFinanceDetailEntityById(id);
    }
}
